home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 28
/
Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso
/
Aminet
/
dev
/
amos
/
AMOSList-0998.lzh
/
AMOSLIST
/
000106_bounce-amos-li…net@onelist.com_Sat Sep 5 11:35:22 1998.msg
< prev
next >
Wrap
Text File
|
1998-10-01
|
5KB
|
123 lines
>From bounce-amos-list--966-mcox=access.digex.net@onelist.com Sat Sep 5 11:35:22 1998
Received: from onelist.com (pop.onelist.com [209.207.135.253])
by pony-2.mail.digex.net (8.8.8/8.8.8) with SMTP id LAA06923
for <mcox@access.digex.net>; Sat, 5 Sep 1998 11:35:21 -0400 (EDT)
Received: (qmail 16921 invoked by alias); 5 Sep 1998 15:33:01 -0000
Received: (qmail 16886 invoked from network); 5 Sep 1998 15:32:58 -0000
Received: from unknown (HELO rhenium.btinternet.com) (194.73.73.93) by pop.onelist.com with SMTP; 5 Sep 1998 15:32:58 -0000
Received: from np5gt [195.99.57.220] by rhenium.btinternet.com with smtp (Exim 1.70 #1) id 0zFKKr-0004fe-00; Sat, 5 Sep 1998 16:33:09 +0100
Message-ID: <002b01bdd8e2$ae10ff80$dc3963c3@np5gt>
From: "John Glanville" <John.Glanville@btinternet.com>
To: <amos-list@onelist.com>
Date: Sat, 5 Sep 1998 16:33:04 +0100
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Mailing-List: list amos-list@onelist.com; contact http://www.onelist.com
Delivered-To: mailing list amos-list@onelist.com
Precedence: bulk
Reply-to: amos-list@onelist.com
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: [amos-list] Re: REPOSTING OF JOYSTICK CODE...
Status: O
X-Status:
From: "John Glanville" <John.Glanville@btinternet.com>
-----Original Message-----
From: Garfield Benjamin <gbenjam@sosbbs.com>
To: amos-list@onelist.com <amos-list@onelist.com>
Date: 05 September 1998 15:25
Subject: [amos-list] REPOSTING OF JOYSTICK CODE...
>From: "Garfield Benjamin" <gbenjam@sosbbs.com>
>
>ORIGINALLY SENT WEDNESDAY, NOW I AM RESENDING...
>----------
>
>>>> Hey! Look! At this Ne1 want a piece of joystick code...
>>>Timer=0
>>>For A=0 To 100000
>>> J=Joy(1) : K=J-2 : P#=J/4.0 : P=P# : I=Sgn(J)
>>> If P#=P Then X=Sgn(J-6)*I
>>> If P=0 Then Y=I*(K+K+1)
>>>Next
>>>Print Timer
>
>>> Hmm this seemed a bit too complicated, so I decided to check it out
>>>(and I managed to kill 5mins at the same time ;)
>>>Timer=0
>>>For A=0 To 100000
>>> X=0 : Y=0
>>> If Jup(1) Then Y=-1
>>> If Jdown(1) Then Y=1
>>> If Jleft(1) Then X=-1
>>> If Jright(1) Then X=1
>>>Next
>>>Print Timer
>
>Well, I live for writing compact, optimized code...
>THE OPTIMIZED WAY:
>Timer=0
>For REP=0 To 100000
> X=Jleft(1)-Jright(1)
> Y=Jup(1)-Jdown(1)
>Next REP
>Print Timer
>
>Compiled with AMOS PRO Compiler and tested on a 14MHz NTSC
>Amiga...
>
>NO JOYSTICK MOVEMENT
> First version: 779
> Second version: 502
> My version: 471
>
>HOLDING DOWN ON JOYSTICK
> First Version: 933
> Second version: 511
> My version: 476
>
>Obviously, if tested on an accelerated Amiga the performance will be
>greatly increased (ie. smaller times) and it is much shorter as well.
>
>
> Garfield Benjamin e-mail:gbenjam@sosbbs.com
> Website( http://www.sosbbs.com/~gbenjam
>
>------------------------------------------------------------------------
>To unsubscribe from this mailing list, or to change your subscription
>to digest, go to the ONElist web site, at http://www.onelist.com and
>select the User Center link from the menu bar on the left.
>
Hey!!! I WAS BORED OKAY!!!! I didn't think ne1 would be strange enough 2
even reply... Let alone do a speed test on it!!! Now I have had 2 replys
this is getting crazy! Ne way... I had no Idea that those amos commands
existed! true I had ceen them before but i just never though about it!...
basically You can do the same thing as U have done 2 keystate commands..
which is what i do! So if I had known about those commands I would never
have bothered 2 write the code! So why is everyone so strange???????
Ne way! Have fun! and I'll be Round so if u want ne code lengthened or made
more complicated! I'm right here! BYE!
oh by the way... if u want it 2 go faster use variables instead of the 1's
it most probably wont make a difference for a single digit.. but it takes
longer 2 read in any numbers and work out there values that it does 2 read a
variable.. thats why it is faster 2 open a screen if u write
Screen open 0,640,256,16,Hires
instead of....
Screen open 0,640,256,16,32768
as Hires is an internal variable!
BYE!
------------------------------------------------------------------------
Help support ONElist, while generating interest in your product or
service. ONElist has a variety of advertising packages. Visit
http://www.onelist.com/advert.html for more information.